package com.ruoyi.system.controllerApi;

import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.system.domain.ParkingLot;
import com.ruoyi.system.service.IParkingLotService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/api/park")
public class ParkApiController {

    @Autowired
    private IParkingLotService parkingLotService;

    @GetMapping("/getParkingLot")
    public AjaxResult getParkingLot() {
        List<ParkingLot> parkingLotList =parkingLotService.getParkingLotByAddTime();
        return AjaxResult.success(parkingLotList);
    }
}
